import request from '@/request/request'

// 创建评论
export function createMsg(data) {
    return request({
        url: '/app/msg/create',
        method: 'post',
        data: data
    })
}

// 更新评论
export function updateMsg(data) {
    return request({
        url: '/app/msg/update',
        method: 'put',
        data: data
    })
}

// 删除评论
export function deleteMsg(id) {
    return request({
        url: '/app/msg/delete?id=' + id,
        method: 'delete'
    })
}

// 获得评论
export function getMsg(id) {
    return request({
        url: '/app/msg/get/byArticelId?id=' + id,
        method: 'get'
    })
}

// 获得评论分页
export function getMsgPage(params) {
    return request({
        url: '/app/msg/page',
        method: 'POST',
        data: params
    })
}
// 导出评论 Excel
export function exportMsgExcel(params) {
    return request({
        url: '/app/msg/export-excel',
        method: 'get',
        params,
        responseType: 'blob'
    })
}
